home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt32s3.arc / PIBUPLOD.PAS < prev    next >
Pascal/Delphi Source File  |  1985-11-03  |  7KB  |  99 lines

  1. (*----------------------------------------------------------------------*)
  2. (*        PIBUPLOAD.PAS --- File Upload Routines for PibTerm            *)
  3. (*----------------------------------------------------------------------*)
  4. (*                                                                      *)
  5. (*  Author:  Philip R. Burns                                            *)
  6. (*           Copyright (c) November, 1985                               *)
  7. (*                                                                      *)
  8. (*  Version: 1.0   (January, 1985)                                      *)
  9. (*           2.0   (June, 1985)                                         *)
  10. (*           3.0   (October, 1985)                                      *)
  11. (*           3.2   (November, 1985)                                     *)
  12. (*                                                                      *)
  13. (*  Systems: For MS-DOS on IBM PCs and close compatibles only.          *)
  14. (*           Note:  I have checked these on Zenith 151s under           *)
  15. (*                  MSDOS 2.1 and IBM PCs under PCDOS 2.0.              *)
  16. (*                                                                      *)
  17. (*  History: Original with me, but the XMODEM is based upon the         *)
  18. (*           famous (X)MODEM(7) programs of Christiansen, et. al.       *)
  19. (*           Note that both the Checksum and CRC versions of XMODEM     *)
  20. (*           are available here.                                        *)
  21. (*                                                                      *)
  22. (*           Version 2.0 added the MODEM7, TELINK, and YMODEM protocols.*)
  23. (*           Version 3.0 added the Kermit protocol.                     *)
  24. (*           Parts of the Kermit code are based upon a CP/M Turbo       *)
  25. (*           version of Kermit by Jeff Duncan.                          *)
  26. (*                                                                      *)
  27. (*           Suggestions for improvements or corrections are welcome.   *)
  28. (*           Please leave messages on Gene Plantz's BBS (312) 882 4145  *)
  29. (*           or Ron Fox's BBS (312) 940 6496.                           *)
  30. (*                                                                      *)
  31. (*           IF you use this code in your own programs, please be nice  *)
  32. (*           and give proper credit.                                    *)
  33. (*                                                                      *)
  34. (*----------------------------------------------------------------------*)
  35. (*                                                                      *)
  36. (*                            Restriction                               *)
  37. (*                            -----------                               *)
  38. (*                                                                      *)
  39. (*           You may use this code only for NON COMMERCIAL purposes     *)
  40. (*           unless you explicitly obtain my permission.  I take a dim  *)
  41. (*           view of others making money on my work and those of other  *)
  42. (*           people whose code I've inserted here.                      *)
  43. (*                                                                      *)
  44. (*----------------------------------------------------------------------*)
  45. (*                                                                      *)
  46. (*  Routines:                                                           *)
  47. (*                                                                      *)
  48. (*     PibUpLoad  --- Main control routine                              *)
  49. (*                                                                      *)
  50. (*     Send_Ascii_File     --- Send Ascii file to another computer      *)
  51. (*     Send_Xmodem_File    --- Send file with XMODEM                    *)
  52. (*     Send_Modem7_File    --- Send file with MODEM7                    *)
  53. (*     Send_Telink_File    --- Send file with Telink                    *)
  54. (*     Send_Kermit_File    --- Send file with Kermit                    *)
  55. (*                                                                      *)
  56. (*     Get_Upload_Transfer_Protocol --- Determines type of transfer     *)
  57. (*                                                                      *)
  58. (*----------------------------------------------------------------------*)
  59.  
  60. (*----------------------------------------------------------------------*)
  61. (*           PibUpLoad --- Control routine for uploads/downloads        *)
  62. (*----------------------------------------------------------------------*)
  63.  
  64. OVERLAY PROCEDURE PibUpLoad( Transfer_Protocol : Transfer_Type );
  65.  
  66. (*----------------------------------------------------------------------*)
  67. (*                                                                      *)
  68. (*     Procedure:  PibUpload                                            *)
  69. (*                                                                      *)
  70. (*     Purpose:    Controls uploading of files to remote hosts.         *)
  71. (*                                                                      *)
  72. (*     Calling Sequence:                                                *)
  73. (*                                                                      *)
  74. (*        PibUpLoad( Transfer_Protocol : Transfer_Type );               *)
  75. (*                                                                      *)
  76. (*           Transfer_Protocol --- type of transfer to do               *)
  77. (*                                                                      *)
  78. (*     Remarks:                                                         *)
  79. (*                                                                      *)
  80. (*        Currently, the only available protocols are:                  *)
  81. (*                                                                      *)
  82. (*           Ascii file transfer (no error-correction)                  *)
  83. (*           Xmodem with Checksum                                       *)
  84. (*           Xmodem with CRC                                            *)
  85. (*           Modem7                                                     *)
  86. (*           Telink                                                     *)
  87. (*           Kermit                                                     *)
  88. (*                                                                      *)
  89. (*      Calls:   Send_Ascii_File                                        *)
  90. (*               Send_Xmodem_File                                       *)
  91. (*               Send_Modem7_File                                       *)
  92. (*               Send_Kermit_File                                       *)
  93. (*               Send_Telink_File                                       *)
  94. (*                                                                      *)
  95. (*----------------------------------------------------------------------*)
  96.  
  97. VAR
  98.    OK_Init           : BOOLEAN;
  99.    I                 : INTEGER;